﻿package components 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFieldAutoSize;
	
	/**
	 * ...
	 * @author s
	 */
	public class FisheyeListBoxItem extends TextField
	{
		private static const TEXT_FORMAT:TextFormat = new TextFormat("ＭＳ Ｐゴシック", FisheyeListBox.TEXT_HEIGHT);
		
		private var _key:String;
		internal var _index:int;

		public function FisheyeListBoxItem(parent:Sprite, label:String, key:String, color:int) 
		{
			super();
			parent.addChild(this);
			//tf.width = this.width;
			autoSize = TextFieldAutoSize.LEFT;
			selectable = false;
			textColor = color;
			x = 0;
			y = 0;
			text = label;
			_key = key;
			setTextFormat(TEXT_FORMAT);
		}
		
		public function get key():String 
		{
			return _key;
		}
	}

}